import java.util.Scanner;

/**
 * @License: (C) Copyright 2013-2022
 * @Contact: abcque@outlook.com
 * @IDE: IntelliJ IDEA
 * @Encoding: utf-8
 * @Project: st2212 2213
 * @Package: PACKAGE_NAME
 * @File: SeasonV2.java
 * @Time: 2022/11/29 8:28
 * @Author: abcque
 * @Description: 将月份转化为季节
 * @Modifier
 * @ModifyDate
 * @ModifyRemark
 */
public class SeasonV2 {
    public static void main(String[] args) {
        // step1 定义月份的变量
        int month;
        // step2 通过控制台输入月份
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入月份的值：");
        month = scanner.nextInt();

        // step3 将月份转化为季节
        switch (month) {
            case 12:
            case 1:
            case 2:
                System.out.println(month + " 所在的季节是冬季");
                break;
            case 3:
            case 4:
            case 5:
                System.out.println(month + " 所在的季节是春季");
                break;
            case 6:
            case 7:
            case 8:
                System.out.println(month + " 所在的季节是夏季");
                break;
            case 9:
            case 10:
            case 11:
                System.out.println(month + " 所在的季节是秋季");
                break;
            default:
                System.out.println("输入的月份超出了范围");
                break;
        }
    }
}
